package com.yihaodian.index;

import java.io.IOException;

import com.yihaodian.search.core.Searcher;
import com.yihaodian.search.core.Suggester;
import com.yihaodian.server.LifeCycleService;

public interface IndexShard extends LifeCycleService {

	/**
	 * 
	 * @return
	 */
	public Suggester getSuggester(String field) throws IOException;

	/**
	 * 
	 * @return
	 */
	public Searcher getSearcher();

	/**
	 */
	public Indexer getIndexer() throws IOException;

	/**
	 * switch to new index.
	 * 
	 * @param version
	 *            fullPath
	 */
	public void switchIndex(String dir);

}
